package com.server.common.logistics.yw56.create;

import com.google.gson.annotations.SerializedName;
import com.server.common.logistics.request.LogisticsRequest;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

@NoArgsConstructor
@Getter
@Setter
public class YW56CreateOrderRequest extends LogisticsRequest {
    @SerializedName("channelId")
    private String channelId;
    @SerializedName("orderSource")
    private String orderSource;
    @SerializedName("userId")
    private String userId;
    @SerializedName("orderNumber")
    private String taskOrderNumber;
    @SerializedName("dateOfReceipt")
    private String dateOfReceipt;
    @SerializedName("remark")
    private String remark;
    @SerializedName("receiverInfo")
    private ReceiverInfo receiverInfo;
    @SerializedName("parcelInfo")
    private ParcelInfo parcelInfo;
    @SerializedName("senderInfo")
    private SenderInfo senderInfo;

    @NoArgsConstructor
    @Getter
    @Setter
    public static class ReceiverInfo {
        @SerializedName("name")
        private String name;
        @SerializedName("phone")
        private String phone;
        @SerializedName("email")
        private String email;
        @SerializedName("company")
        private String company;
        @SerializedName("country")
        private String country;
        @SerializedName("state")
        private String state;
        @SerializedName("city")
        private String city;
        @SerializedName("zipCode")
        private String zipCode;
        @SerializedName("houseNumber")
        private String houseNumber;
        @SerializedName("address")
        private String address;
        @SerializedName("taxNumber")
        private String taxNumber;
    }

    @NoArgsConstructor
    @Getter
    @Setter
    public static class ParcelInfo {
        @SerializedName("productList")
        private List<ProductList> productList;
        @SerializedName("hasBattery")
        private Integer hasBattery;
        @SerializedName("currency")
        private String currency;
        @SerializedName("totalPrice")
        private String totalPrice;
        @SerializedName("totalQuantity")
        private String totalQuantity;
        @SerializedName("totalWeight")
        private String totalWeight;
        @SerializedName("height")
        private String height;
        @SerializedName("width")
        private String width;
        @SerializedName("length")
        private String length;
        @SerializedName("ioss")
        private String ioss;

        @NoArgsConstructor
        @Getter
        @Setter
        public static class ProductList {
            @SerializedName("goodsNameCh")
            private String goodsNameCh;
            @SerializedName("goodsNameEn")
            private String goodsNameEn;
            @SerializedName("price")
            private String price;
            @SerializedName("quantity")
            private String quantity;
            @SerializedName("weight")
            private String weight;
            @SerializedName("hscode")
            private String hscode;
            @SerializedName("url")
            private String url;
            @SerializedName("material")
            private String material;
        }
    }

    @NoArgsConstructor
    @Getter
    @Setter
    public static class SenderInfo {
        @SerializedName("name")
        private String name;
        @SerializedName("phone")
        private String phone;
        @SerializedName("company")
        private String company;
        @SerializedName("email")
        private String email;
        @SerializedName("country")
        private String country;
        @SerializedName("state")
        private String state;
        @SerializedName("city")
        private String city;
        @SerializedName("zipCode")
        private String zipCode;
        @SerializedName("houseNumber")
        private String houseNumber;
        @SerializedName("address")
        private String address;
        @SerializedName("taxNumber")
        private String taxNumber;
    }
}
